require("../css/advert.less")
require("animate.css")


//dom入口
document.ready(function () {
    //主体部分倒计时
    //获取元素
    let countDown = document.querySelector(".count-down")
    //设置一个定时器
    let i = 5
    countDown.innerHTML = i + "s"
    let timeId = setInterval(function () {
        i--;
        if (i <= 0) {
            clearInterval(timeId)
            location.href = "./login.html"
        }
        countDown.innerHTML = i + "s"
    }, 1000)

    //跳过设置点击事件
    let skip = document.querySelector(".skip")
    skip.addEventListener("click", function () {
        location.href = "./login.html"
    })
})

